<?php
    class Controller extends CI_Model{
        function __construct(){
            // Call the Model constructor
            parent::__construct();
        }

        public function getList(){        
            $query = $this->db->get('controllers');
            return $query->result();
        }
        
        public function fetchPairs(){
            $array = array();
            $list = $this->getList();
            foreach($list as $item){
                $array[$item->controller_id] = $item->controller_name;
            }
            return $array;
        }
    }  
?>